﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Enterprise.Management.Gridview;

namespace System.Web.Mvc.Html
{
    public static class GridviewHelper
    {
        public static MvcHtmlString Gridview(this HtmlHelper html, string url)
        {
            return MvcHtmlString.Create(string.Format(@"
                <script type=""text/javascript"">$(function(){{$(""#{0}"").gridview({{url:'{1}'}});}})</script><div id=""{0}"" url=""{1}""></div>
            ", Guid.NewGuid().ToString(), url));
        }
    }
}